package com.xs.designs.observer.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/***
 * @Author 徐庶   QQ:1092002729
 * @Slogan 致敬大师，致敬未来的你
 *
 * 监听器
 */
@Component
public class XushuEventListener implements ApplicationListener<XushuEvent> {

    // 基于注解的
    //@EventListener(XushuEvent.class)
    public void onApplicationEvent(XushuEvent event) {
        System.out.println(event.getName());
    }

}
